import request from '@/utils/request'

export function getInfo() {
  return request({
    url: '/mgr/user',
    method: 'get'
  })
}

export function changeInfo(params) {
  return request({
    url: '/mgr/user',
    method: 'put',
    data: params
  })
}

export function bindMobile(params) {
  return request({
    url: '/mgr/user/mobile',
    method: 'post',
    data: params
  })
}

export function changeMobile(params) {
  return request({
    url: '/mgr/user/mobile',
    method: 'put',
    data: params
  })
}

export function getVerifycode(params) {
  return request({
    url: '/mgr/user/verifycode',
    method: 'get',
    params
  })
}

export function checkVerifycode(data) {
  return request({
    url: '/mgr/user/verifycode',
    method: 'post',
    data: data
  })
}

export function forgetPassword(data) {
  return request({
    url: '/mgr/user/forgetpass',
    method: 'post',
    data: data
  })
}

export function resetPassword(data) {
  return request({
    url: '/mgr/user/resetpass',
    method: 'post',
    data: data
  })
}

export function getUserList() {
  return request({
    url: '/mgr/userlist',
    method: 'get'
  })
}

export function setUserStatus(data) {
  return request({
    url: '/mgr/user/status',
    method: 'post',
    data: data
  })
}
